package com.lxy.controller;

import com.lxy.dao.DrugsDao;
import com.lxy.entity.Drugs;

import java.util.List;

public class DrugController {

    private static final DrugsDao DRUGS_DAO = new DrugsDao();

    public static List<Drugs> query() {
        return DRUGS_DAO.query();
    }

    public static Drugs drugQuery(String name) {
        return DRUGS_DAO.drugQuery(name);
    }

    public static Integer updateDrug(String name, String property, String propertyValue) throws Exception {
        return DRUGS_DAO.updateDrug(name, property, propertyValue);
    }

    public static Integer deleteDrug(String name) {
        return DRUGS_DAO.deleteDrug(name);
    }

    public static Integer insertDrug(Drugs drug) {
        return DRUGS_DAO.insertDrug(drug);
    }
}